/**
 * 
 */
package com.mes.check.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.ForeignKey;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.context.annotation.Lazy;

import com.mes.basicdata.domain.Employee;
import com.mes.basicdata.domain.OperationMeasurement;
import com.mes.common.domain.BasicModel;

/**
 * <p>
 * 让步单明细
 * </p>
 */
@Entity()
@Table(name = "M_REWORKDETAIL")
@BatchSize(size=20)
@Lazy(value=true)
@Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class ReworkDetail extends BasicModel implements
		java.io.Serializable {

	/**
	 * 复杂对象映射--Rework rework
	 */
	@Id
	@GenericGenerator(name = "uniqueId", strategy = "assigned")
	@Column(name="UNIQUEID")
	protected String uniqueId;
	
	@Column(name="REWORKUID",length=50)
	protected String reworkUid;
	
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "REWORKUID", insertable = false, updatable = false)
	protected Rework rework;
	
	@Column(name="REPAIRUID",length=50)
	protected Long seq;

	@Column(name="RWCONTENTS",length=50)
	protected String reworkContents;
	
	@Column(name="MATERIALSNS",length=50)
	protected String materialSns;
	
	@Column(name="RWMETHORD",length=50)
	protected String reworkMethord;

	/**
	 * 复杂对象映射--Employee reworker
	 */
	@Column(name="REWORKER",length=50)
	protected String reworkerUid;
	
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "REWORKER", insertable = false, updatable = false)
	protected Employee reworker;

	@Column(name="RWWORKTIME",length=50)
	protected Date reworkTime;
	
	@Column(name="RWRESULT",length=50)
	protected String reworkResult;

	/**
	 * 复杂对象映射--Employee rwchecker
	 */
	@Column(name="RWCHECKER",length=50)
	protected String reworkCheckerUid;
	
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RWCHECKER", insertable = false, updatable = false)
	protected Employee reworkChecker;

	@Column(name="RWCHECKTIME",length=50)
	protected Date reworkCheckTime;
	
	@Column(name="REWORKQTY",length=50)
	protected Float reworkQty;
	
	@Column(name="DEFECTQTY",length=50)
	protected Float defectQty;
	
	@Column(name="MEASUREMENTUID",length=50)
	protected String measurementUid;
	
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MEASUREMENTUID", insertable = false, updatable = false)
	protected OperationMeasurement operationMeasurement;

	// Constructors

	/** default constructor */
	public ReworkDetail() {
	}

	/**
	 * 获取序列号。
	 * 
	 * @return the seq
	 */
	
	public Long getSeq() {
		return seq;
	}

	/**
	 * 设置序列号。
	 * 
	 * @param seq
	 *            the seq to set
	 */
	public void setSeq(Long seq) {
		this.seq = seq;
	}

	/**
	 * 获取返工编号。
	 * 
	 * @return the reworkUid
	 */
	
	public String getReworkUid() {
		return reworkUid;
	}

	/**
	 * 设置返工编号。
	 * 
	 * @param reworkUid
	 *            the reworkUid to set
	 */
	public void setReworkUid(String reworkUid) {
		this.reworkUid = reworkUid;
	}

	/**
	 * 获取返工单表头。
	 * 
	 * @return the rework
	 */
	
	public Rework getRework() {
		return rework;
	}

	/**
	 * 设置返工单表头。
	 * 
	 * @param rework
	 *            the rework to set
	 */
	public void setRework(Rework rework) {
		this.rework = rework;
	}

	/**
	 * 获取返工内容。
	 * 
	 * @return the reworkContents
	 */
	
	public String getReworkContents() {
		return reworkContents;
	}

	/**
	 * 设置返工内容。
	 * 
	 * @param reworkContents
	 *            the reworkContents to set
	 */
	public void setReworkContents(String reworkContents) {
		this.reworkContents = reworkContents;
	}

	/**
	 * 获取物料序号。
	 * 
	 * @return the materialSns
	 */
	
	public String getMaterialSns() {
		return materialSns;
	}

	/**
	 * 设置物料序号。
	 * 
	 * @param materialSns
	 */
	public void setMaterialSns(String materialSns) {
		this.materialSns = materialSns;
	}

	/**
	 * 获取返工方法。
	 * 
	 * @return the reworkMethord
	 */
	
	public String getReworkMethord() {
		return reworkMethord;
	}

	/**
	 * 设置返工方法。
	 * 
	 * @param reworkMethord
	 *            the reworkMethord to set
	 */
	public void setReworkMethord(String reworkMethord) {
		this.reworkMethord = reworkMethord;
	}

	/**
	 * 获取返工人员编号。
	 * 
	 * @return the reworkerUid
	 */
	
	public String getReworkerUid() {
		return reworkerUid;
	}

	/**
	 * 设置返工人员编号。
	 * 
	 * @param reworkerUid
	 *            the reworkerUid to set
	 */
	public void setReworkerUid(String reworkerUid) {
		this.reworkerUid = reworkerUid;
	}

	/**
	 * 获取返工人员。
	 * 
	 * @return the reworker
	 */
	
	public Employee getReworker() {
		return reworker;
	}

	/**
	 * 设置返工人员。
	 * 
	 * @param reworker
	 *            the reworker to set
	 */
	public void setReworker(Employee reworker) {
		this.reworker = reworker;
	}

	/**
	 * 获取返工时间。
	 * 
	 * @return the reworkTime
	 */
	
	public Date getReworkTime() {
		return reworkTime;
	}

	/**
	 * 设置返工时间。
	 * 
	 * @param reworkTime
	 *            the reworkTime to set
	 */
	public void setReworkTime(Date reworkTime) {
		this.reworkTime = reworkTime;
	}

	/**
	 * 获取返工结果。
	 * 
	 * @return the reworkResult
	 */
	
	public String getReworkResult() {
		return reworkResult;
	}

	/**
	 * 设置返工结果。
	 * 
	 * @param reworkResult
	 *            the reworkResult to set
	 */
	public void setReworkResult(String reworkResult) {
		this.reworkResult = reworkResult;
	}

	/**
	 * 获取返工检验人员编号。
	 * 
	 * @return the reworkCheckerUid
	 */
	
	public String getReworkCheckerUid() {
		return reworkCheckerUid;
	}

	/**
	 * 设置返工检验人员编号。
	 * 
	 * @param reworkCheckerUid
	 *            the reworkCheckerUid to set
	 */
	public void setReworkCheckerUid(String reworkCheckerUid) {
		this.reworkCheckerUid = reworkCheckerUid;
	}

	/**
	 * 获取返工检验员。
	 * 
	 * @return the reworkChecker
	 */
	
	public Employee getReworkChecker() {
		return reworkChecker;
	}

	/**
	 * 设置返工检验员。
	 * 
	 * @param reworkChecker
	 *            the reworkChecker to set
	 */
	public void setReworkChecker(Employee reworkChecker) {
		this.reworkChecker = reworkChecker;
	}

	/**
	 * 获取返工检验时间。
	 * 
	 * @return the reworkCheckTime
	 */
	
	public Date getReworkCheckTime() {
		return reworkCheckTime;
	}

	/**
	 * 设置返工检验时间。
	 * 
	 * @param reworkCheckTime
	 *            the reworkCheckTime to set
	 */
	public void setReworkCheckTime(Date reworkCheckTime) {
		this.reworkCheckTime = reworkCheckTime;
	}

	/**
	 * 获取返工数量。
	 * 
	 * @return the reworkQty
	 */
	
	public Float getReworkQty() {
		return reworkQty;
	}

	/**
	 * 设置返工数量。
	 * 
	 * @param reworkQty
	 */
	public void setReworkQty(Float reworkQty) {
		this.reworkQty = reworkQty;
	}

	/**
	 * 获取不合格品数量。
	 * 
	 * @return the defectQty
	 */
	
	public Float getDefectQty() {
		return defectQty;
	}

	/**
	 * 设置不合格品数量。
	 * 
	 * @param defectQty
	 */
	public void setDefectQty(Float defectQty) {
		this.defectQty = defectQty;
	}

	/**
	 * 获取测量编号。
	 * 
	 * @return the measurementUid
	 */
	
	public String getMeasurementUid() {
		return measurementUid;
	}

	/**
	 * 设置测量编号。
	 * 
	 * @param measurementUid
	 *            the measurementUid to set
	 */
	public void setMeasurementUid(String measurementUid) {
		this.measurementUid = measurementUid;
	}

	/**
	 * 获取测量操作。
	 * 
	 * @return the operationMeasurement
	 */
	
	public OperationMeasurement getOperationMeasurement() {
		return operationMeasurement;
	}

	/**
	 * 设置测量操作。
	 * 
	 * @param operationMeasurement
	 *            the operationMeasurement to set
	 */
	public void setOperationMeasurement(
			OperationMeasurement operationMeasurement) {
		this.operationMeasurement = operationMeasurement;
	}
}
